class CreateBorrowings < ActiveRecord::Migration
  def self.up
    create_table :borrowings do |t|
      t.column :book_id, :integer, :null => false
      t.column :user_id, :integer, :null => false
      t.column :state,   :integer, :null => false
      t.column :borrowing_date, :date, :null => false
      t.column :returned_date, :date
    end
  end

  def self.down
    drop_table :borrowings
  end
end
